#include "timer_utils.h"
#include <time.h>

uint32_t get_system_time_ms(void) {
    struct timespec ts;
    clock_gettime(CLOCK_MONOTONIC, &ts);
    return (uint32_t)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
}

uint32_t get_system_time_sec(void) {
    return get_system_time_ms() / 1000;
}
